<%@page import="com.situ.hotel.entity.Emp"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.Connection"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

<link rel="stylesheet" type="text/css" href="bootstrap-3.3.7-dist/css/bootstrap.css"/>
</head>
<body>
	<%-- ${list} --%>
	<button class="btn btn-primary">添加</button>
	<table class="table table-striped table-bordered table-condensed"> 
		<tr>
			<td>员工号</td>
			<td>姓名</td>
			<td>地址</td>
			<td>手机号</td>
			<td>出生日期</td>
			<td>密码</td>
			<td>删除</td>
		</tr>
		<%
			ArrayList<Emp> list = (ArrayList<Emp>)request.getAttribute("list");
			for (Emp emp : list) {
		%>
				<tr>
					<td><%=emp.getCode()%></td>
					<td><%=emp.getName()%></td>
					<td><%=emp.getAddress()%></td>
					<td><%=emp.getPhone()%></td>
					<td><%=emp.getBirthday()%></td>
					<td><%=emp.getPassword()%></td>
					<td><a href="/Hotel/emp?method=delete&code=<%=emp.getCode()%>">删除</a></td>
				</tr>
		<%
			}
		%>
		
		
		
	</table>
	
	
</body>
</html>